const router = require('express').Router()
const { GetFormByAdminId, UpdateFormStatus } = require('../../handler/forms')

// 获取列表
router.get('/applyList', (req, res) => {
  GetFormByAdminId(req.query).then(result => res.send(result)).catch(err => res.send(error('服务异常')))
})

//审批
router.post('/approval', (req, res) => {
  UpdateFormStatus(req.body).then(result => res.send(result)).catch(err => res.send(error('服务异常')))
})

module.exports = router